package com;

import com.go2.shipping.common.encrypt.AES;
import com.yuhang.demo.util.PostUtil;
import org.apache.http.NameValuePair;

import java.io.IOException;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * @author yuhang
 * @desc
 * @since 2022/5/20
 */
public class NewCloudTest {

//    private static String api = "http://192.168.10.203:8484";
    private static String api = "http://127.0.0.1:8484";
    public static void main(String[] args) throws Exception {
//        String ret = supplierIndex();
          String ret=xx();
        System.out.println(ret);
    }



    private static String xx() throws IOException {

        String spi="http://192.168.10.37:28300/api/ad/smart/pageList";
        return PostUtil.httpPostBody(spi,"{\"userId\":\"305618\",\"source\":\"e3e3\",\"pageNum\":\"1\",\"pageSize\":\"9999\",\"states\":\"0,1,3\"}");
    }



    private static String supplierIndex() throws Exception {
        String url = api + "/api/supplier/getSupplierIndex";
        Map<String,Object> formparams=new HashMap<>();
        formparams.put("shopTemplate","TEMPLATE");
        formparams.put("source","e3e3");
        formparams.put("userId","642246");
        formparams.put("template",2);
        return PostUtil.httpCloud(url,formparams);
    }
}
